//SKU管理的ts类型
import type {skuAttrValue,skuSaleAttrValue,ResponseData} from '../spu/type'

export interface skuAttrValueInfoList{
    _id?:string,
    id?:number|string,
    level?:number;
    name?:string,
    parentId?:number|string,
}
export interface skuSaleAttrValueInfoList{
    _id?:string,
    id?:number|string,
    baseSaleAttrId?:number,
    saleAttrName?:string,
    saleAttrValueName?:string,
    level?:number;
    parentId?:number|string,
}

export interface skuImageList{
    id?:number|string,
    spuId?:number|string,
    imgName?:string,
    imgUrl?:string,
    level?:number|string
}
//sku数据类型
export interface Records{
    id?:number,
    parentId?:number,
    spuId?: number,
    tmid?:number,
    skuName?:string,
    price?:number,
    weight?: number,
    skuDesc?: string,
    skuAttrValueList?:skuAttrValue[],
    skuSaleAttrValueList?:skuSaleAttrValue[],
    skuDefaultImg?:string,
    isSale?:number,
    skuImageList?:skuImageList[],
    skuAttrValueInfoList?:skuAttrValueInfoList[],
    skuSaleAttrValueInfoList?:skuSaleAttrValueInfoList[]
}
//获取sku请求返回的数据的data类型
export interface skuData{
    total:number,
    pageNow:number,
    pages: number
    records:Records[]
}
//sku请求返回的类型
export interface skuResposeData extends ResponseData{
    data:skuData
}

export interface skuGetResponseData extends ResponseData{
    data:Records
}
